<?php
/**
 * Project: AIGC
 * Author: moufer <moufer@163.com>
 * Date: 2024/7/21 14:14
 */

namespace module\chat\controller;

use module\chat\logic\ConfigLogic;
use module\user\library\UserController;
use mof\ApiResponse;
use think\response\Json;

class Index extends UserController
{
    public function channels(ConfigLogic $logic): Json
    {
        $data = $logic->getChannels([
            'consumption' => true,
            'user'        => $this->auth->isLogin() ? $this->auth->getUser() : null
        ])->scene('simple');

        return ApiResponse::success($data);
    }

}